package com.idol.framework.factory;

import java.util.HashMap;
import java.util.Map;
import java.util.Set;

/**
 * @author Supreme_Sir
 * @version 1.0
 * @className BeanContainer
 * @description IoC 容器
 * @date 2020/10/31 15:40
 **/
public class BeanContainer {
    private static BeanContainer INSTANCE = new BeanContainer();
    private static final Map<String, Object> CONTAINER = new HashMap<>(16);

    public Object get(String key) {
        return CONTAINER.get(key);
    }

    public void put(String key, Object val) {
        CONTAINER.put(key, val);
    }

    public Set<Map.Entry<String, Object>> getEntrySet() {
        return CONTAINER.entrySet();
    }

    public static BeanContainer getInstance() {
        return INSTANCE;
    }

    private BeanContainer() {
    }
}
